.forum-page {
  padding: 20px;
  background-color: #f8f8fb;
  min-height: 100vh;
}

.forum-header-wrapper {
  position: relative;
  text-align: center;
  margin-bottom: 20px;
}

.forum-title {
  font-size: 32px;
  font-weight: bold;
  color: #ff6699;
  margin: 0;
}

.new-thread-btn-wrapper {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
}

.new-thread-btn {
  padding: 6px 10px;
  font-size: 16px;
  background-color: #ff6699;
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.new-thread-btn:hover {
  background-color: #ff4477;
}

/* 查询表单样式 - 使用Grid布局对齐 */
.search-form {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  border: 1px solid rgba(255, 102, 153, 0.1);
}

.search-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  align-items: start;
}

.search-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-label {
  font-weight: 600;
  color: #2c3e50;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.search-input,
.search-select {
  padding: 12px 16px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: white;
  height: 44px;
}

.search-input:focus,
.search-select:focus {
  outline: none;
  border-color: #ff6699;
  box-shadow: 0 0 0 3px rgba(255, 102, 153, 0.1);
  transform: translateY(-1px);
}

.search-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

/* 板块多选样式 */
.multi-select-container {
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 12px;
  background: white;
  transition: all 0.3s ease;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.multi-select-container:focus-within {
  border-color: #ff6699;
  box-shadow: 0 0 0 3px rgba(255, 102, 153, 0.1);
  transform: translateY(-1px);
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-size: 14px;
  user-select: none;
}

.checkbox-item:hover {
  background: rgba(255, 102, 153, 0.1);
}

.checkbox-item input[type="checkbox"] {
  margin: 0;
  accent-color: #ff6699;
  width: 16px;
  height: 16px;
}

.checkbox-text {
  color: #2c3e50;
  font-weight: 500;
}

.selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f1f3f4;
}

.selected-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #ff6699, #ff4757);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.remove-tag {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  padding: 0;
  margin-left: 2px;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.remove-tag:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* 特殊项目样式 */
.checkbox-only {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}

.hot-checkbox {
  background: rgba(255, 102, 153, 0.1);
  border: 2px solid rgba(255, 102, 153, 0.2);
  border-radius: 8px;
  padding: 12px 16px;
  transition: all 0.3s ease;
}

.hot-checkbox:hover {
  background: rgba(255, 102, 153, 0.15);
  border-color: rgba(255, 102, 153, 0.3);
}

.search-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}

.search-btn,
.reset-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: center;
  min-height: 44px;
}

.search-btn {
  background: linear-gradient(135deg, #ff6699, #ff4757);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 102, 153, 0.3);
}

.search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 102, 153, 0.4);
}

.reset-btn {
  background: #6c757d;
  color: white;
  box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.reset-btn:hover {
  background: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.forum-content {
  padding: 20px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.content-header h2 {
  margin: 0;
  color: #333;
}

.result-info {
  color: #666;
  font-size: 14px;
}

.loading,
.no-data {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 16px;
}

.thread-card {
  background: #ffffff;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: 0.3s;
  border-left: 4px solid transparent;
}

.thread-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-left-color: #ff6699;
}

.thread-header {
  margin-bottom: 10px;
}

.thread-title {
  margin: 0;
  color: #333;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pinned-tag {
  background-color: #ff6699;
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: normal;
}

.type-tag {
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: normal;
}

.type-tag.type-1 {
  background-color: #e3f2fd;
  color: #1976d2;
}

.type-tag.type-2 {
  background-color: #fff3e0;
  color: #f57c00;
}

.type-tag.type-3 {
  background-color: #e8f5e8;
  color: #388e3c;
}

/* 帖子状态标签样式 */
.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  margin-right: 4px;
  vertical-align: middle;
  background: #bdbdbd;
  transition: background 0.2s;
}

.status-1 { /* 正常 */
  background: #34c759;
}

.status-2 { /* 审核中 */
  background: #ff9800;
}

.status-3 { /* 已锁定 */
  background: #e53935;
}

.thread-meta {
  display: flex;
  gap: 15px;
  font-size: 12px;
  color: #666;
  flex-wrap: wrap;
}

.thread-meta span {
  white-space: nowrap;
}

/* 分页样式 */
.pagination-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  flex-wrap: wrap;
  gap: 15px;
}

.pagination-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #666;
}

.page-size-select {
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.pagination {
  display: flex;
  gap: 5px;
  align-items: center;
}

.page-btn {
  padding: 8px 12px;
  border: 1px solid #ddd;
  background: white;
  color: #333;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  min-width: 40px;
  text-align: center;
}

.page-btn:hover:not(:disabled) {
  background-color: #f5f5f5;
  border-color: #ff6699;
}

.page-btn.active {
  background-color: #ff6699;
  color: white;
  border-color: #ff6699;
}

.page-btn:disabled {
  background-color: #f5f5f5;
  color: #ccc;
  cursor: not-allowed;
}

.page-ellipsis {
  padding: 8px 4px;
  color: #666;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .search-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .search-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .search-actions {
    flex-direction: column;
  }

  .search-btn,
  .reset-btn {
    flex: none;
    width: 100%;
  }

  .checkbox-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .content-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .thread-meta {
    flex-direction: column;
    gap: 5px;
  }

  .pagination-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .pagination {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .forum-page {
    padding: 15px;
  }

  .search-form {
    padding: 20px;
  }

  .multi-select-container {
    padding: 10px;
  }

  .checkbox-group {
    gap: 8px;
  }

  .selected-tags {
    gap: 4px;
  }
}
